1. Field of the Invention
The present invention relates to a PWM control circuit, microcomputer and electronic equipment.
2. Description of the Related Art
There is known a PWM control circuit for generating such PWM (pulse-width modulation) signals as shown in FIG. 1A.
A conventional PWM control circuit as shown in FIG. 1B comprises a PWM period value setting register 900, a counter 902, an edge-point value setting register 904, comparators 906, 908 and an RS flip-flop 909, for example.
The PWM period value setting register 900 is one that stores a period value for specifying the period TP of a PWM signal shown in FIG. 1C. The counter (increment counter) 902 increments a count value based on an operation clock CLK. The edge-point register 904 stores an edge-point setting for specifying a first edge-point (or rising edge) 910 of FIG. 1C at which the level of the PWM signal may change from L-level to H-level, for example.
The comparator 906 compares the edge-point value from the edge-point value setting register 904 with the count value from the counter 902. If they are identical with each other, the comparator 906 generates a H-level signal to be outputted toward the terminal S (set terminal) of the RS flip-flop 909. Thus, the PWM signal will vary from L-level to H-level as shown by the first edge-point (or rising edge) 910 in FIG. 1C.
The comparator 908 compares the period value from the PWM period value setting register 900 with the count value from the counter 902. If they are identical with each other, the comparator 908 generates a H-level signal to be outputted toward the terminal R (reset terminal) of the RS flip-flop 909. Thus, the PWM signal will vary from H-level to L-level as shown by the second edge-point (or falling edge) 912 in FIG. 1C.
However, it was found that such a PWM control circuit of the prior art raised the following problems when it was included in a microcomputer or ASIC.
For example, there is now assumed a case where the PWM signal outputted from the PWM control circuit is converted into an analog sound signal that is in turn utilized to generate a game sound in a game apparatus or a guide voice in a car navigation system. In such a case, the frequency FP of the PWM signal must be set at 80 KHz or higher to prevent inclusion of any returned noise for generating a high-quality sound. Namely, the period TP of the PWM signal shown in FIG. 1C must be set at 1/FP=12.5 μs or lower.
On the other hand, the frequency FC of the operation clock CLK for actuating the counter 902 of FIG. 1B will be restricted in its upper limit due to the performance of the microcomputer or ASIC in which the PWM control circuit is included. For example, a conventional microcomputer designed to aim at reduction of the cost may have its operation clock CLK ranging between 20 MHz and 40 MHz.
For example, if FC is equal to 20 MHz, the resolution (conversion accuracy) of D/A conversion by PWM signal will be equal to about 28 from the calculation of FC/FP=(20×106)/(80×103)=250. This corresponds to the resolution of an 8-bit D/A converter. With FC=40 MHz, the resolution of D/A conversion by PWM signal will be equal to about 29 from the calculation of FC/FP=(40×106)/(80×103)=500. This corresponds to the resolution of a 9-bit D/A converter. In a microcomputer in which the frequency FC of the operation clock CLK ranges between 20 MHz and 40 MHz, the PWM signal having its resolution of 8–9 bits can only be generated.
In the sound output of a modern electronic equipment such as game apparatus or car navigation system, however, the resolution equal to or more than 10 bits is frequently required. Therefore, the microcomputer in which the frequency FC of the operation clock CLK ranges between 20 MHz and 40 MHz as described cannot meet such a requirement. The microcomputer to be incorporated into such electronic equipment had no other choice but to include an analog D/A converter such as resistance ladder type or serial conversion type. However, such an analog D/A converter has its increased circuit scale and is difficult to design its circuit for realizing the high performance. This leads to various problems in increase of the coat, prolongation of the period required by designing and so on.